<template>
  <component :is="icon" v-bind="$attrs" />
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { getIcon } from '@/composables/useIcons'

interface Props {
  // 图标名称
  name: string
}

const props = defineProps<Props>()

const icon = computed(() => {
  return getIcon(props.name)
})
</script>
